<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>练习</title>
    <style>
        .clearfix::after {
            content: '';
            display: block;
            clear: both;
        }

        ul {
            list-style: none;
            padding: 0;
            margin: 20px auto;
            width: 288px;
            /* outline: 1px solid red; */
        }

        ul a {
            display: block;
            height: 65px;
            text-decoration: none;
            color: black;
            /* outline: 1px solid green; */
            padding-top: 10px;

        }

        ul li {
            float: left;
            width: 70px;
            height: 75px;
            border: 1px solid rgb(244, 244, 244);
            text-align: center;
        }

        .icon {
            background-image: url(./img/tb.png);
            width: 24px;
            height: 24px;
            /* outline: 1px solid red; */
            margin: 0 auto 10px;
        }

        li:nth-child(2) .icon {
            background-position: 0 -44px;
        }

        li:nth-child(3) .icon {
            background-position: 0 -88px;
        }
        li:nth-child(4) .icon {
            background-position: 0 -132px;
        }
        li:nth-child(n+5){
            border-top-color: transparent;
        }
        ul li:not(:nth-child(4n)){
            border-right-color: transparent;
        }
    </style>
</head>

<body>
    <ul class="clearfix">
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
        <li>
            <a class="item" href="">
                <div class="icon"></div>
                <span>充话费</span>
            </a>
        </li>
    </ul>
</body>

</html>